<?php
/**
 * Created by PhpStorm.
 * User: wodrow
 * Date: 18-2-6
 * Time: 上午11:47
 * @var \yii\web\View $this
 * @var \backend\modules\logs\models\ApiSendToBankLog $model
 */

$out = [];
$header_data = unserialize($model->header_data);
$get_data = unserialize($model->get_data);
$post_data = unserialize($model->post_data);
if (isset($post_data['pub'])){
    $post_data['pub'] = \yii\helpers\ArrayHelper::toArray(json_decode($post_data['pub']));
}
if (isset($post_data['req'])){
    $post_data['req'] = \yii\helpers\ArrayHelper::toArray(json_decode($post_data['req']));
}
//$x = unserialize($model->return_content);
//$return_content = \yii\helpers\ArrayHelper::toArray($x);
$other_data = unserialize($model->other_data);
\common\components\tools\Out::bo_array([
    'header_data' => $header_data,
    'get_data' => $get_data,
    'post_data' => $post_data,
//    'return_content' => $return_content,
    'other_data' => $other_data,
], $out);
?>

<div class="logs-api-send-to-bank-log-detail">
    <div class="row">
        <div class="col-lg-12">
            <table class="table table-condensed table-bordered">
                <thead>
                <tr>
                    <th width="50px;">键名</th>
                    <th width="50px;">说明</th>
                    <th>值</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach ($out as $k => $v): ?>
                    <?php
                    $x = "";
                    for ($i = 1; $i < $v['deep']; $i++) {
                        $x .= "|--";
                    }
                    ?>
                    <tr>
                        <td><?= $x . $v['k'] ?></td>
                        <td><?= $v['attr'] ?></td>
                        <td><?= $v['v'] ?></td>
                    </tr>
                <?php endforeach; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
